/**
 * 此文件同来维护 登录组件的 API
 */

// 导入二次封装好的axios
import request from '@/utils/request'

/**
 * @desc 登录功能
 * @param {*} data {phone,password}
 * @returns Promise
 */
export const reqLogin = (data) => {
  return request.post('/api/user/passport/login', data)
}

/**
 * @desc 获取用户信息
 * @returns Promise
 */
export const reqUserInfo = () => {
  return request.get('/api/user/passport/auth/getUserInfo')
}

/**
 * @desc 退出登录
 * @returns Promise
 */
export const reqPassport = () => {
  return request.get('/api/user/passport/logout')
}
